﻿using System.Configuration;

namespace Expect.Core.Config
{
    /// <summary>
    /// Configuration element for report generation
    /// </summary>
    public class ReportElement : ConfigurationElement
    {
        /// <summary>
        /// Element constructor
        /// </summary>
        public ReportElement()
        {
            Tokens.Add(new ReportTokenElement{Token = '*', Bold = true});
            Tokens.Add(new ReportTokenElement { Token = '_', Underline = true });
            Tokens.Add(new ReportTokenElement { Token = '@', Underline = true });
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("verbose", IsRequired = false)]
        public string Verbose
        {
            get { return (string)this["verbose"]; }
            set { this["verbose"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("reportapp", IsRequired = false)]
        public string ReportApp
        {
            get { return (string)this["reportapp"]; }
            set { this["reportapp"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("specifications", IsRequired = false)]
        public string Specifications
        {
            get { return (string)this["specifications"]; }
            set { this["specifications"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("descriptions", IsRequired = false)]
        public string Descriptions
        {
            get { return (string)this["descriptions"]; }
            set { this["descriptions"] = value; }
        }

        /// <summary>
        /// Config for tables style name
        /// </summary>
        [ConfigurationProperty("tables", IsRequired = false)]
        public string Tables
        {
            get { return (string)this["tables"]; }
            set { this["tables"] = value; }
        }

        /// <summary>
        /// Config for template file
        /// </summary>
        [ConfigurationProperty("template", IsRequired = true)]
        public string TemplateFile
        {
            get { return (string)this["template"]; }
            set { this["template"] = value; }
        }

        /// <summary>
        /// Config for output file
        /// </summary>
        [ConfigurationProperty("output", IsRequired = true)]
        public string OutputFile
        {
            get { return (string)this["output"]; }
            set { this["output"] = value; }
        }

        /// <summary>
        /// Config for output file
        /// </summary>
        [ConfigurationProperty("headings", IsRequired = false)]
        public string HeadingStyles
        {
            get { return (string)this["headings"]; }
            set { this["headings"] = value; }
        }

        /// <summary>
        /// Config for output file
        /// </summary>
        [ConfigurationProperty("tokens", IsRequired = false)]
        public ReportTokens Tokens
        {
            get { return (ReportTokens)this["tokens"]; }
            set { this["tokens"] = value; }
        }

        /// <summary>
        /// Config for output file
        /// </summary>
        [ConfigurationProperty("blocs", IsRequired = false)]
        public ReportBlocs Blocs
        {
            get { return (ReportBlocs)this["blocs"]; }
            set { this["blocs"] = value; }
        }
    }
}
